package com.tianqingwl.gsystem.common.vo;

/**
 * 统一使用的返回结果，常规用法
 */
public class CommonResultVo extends ResultVo {

    public static CommonResultVo success() {
        CommonResultVo commonResultVo = new CommonResultVo();
        commonResultVo.setSuccess(true);
        return commonResultVo;
    }

    public static CommonResultVo success(Object data) {
        CommonResultVo commonResultVo = new CommonResultVo();
        commonResultVo.setSuccess(true);
        commonResultVo.setData(data);
        return commonResultVo;
    }

    public static CommonResultVo fail(String msg) {
        CommonResultVo commonResultVo = new CommonResultVo();
        commonResultVo.setSuccess(false);
        commonResultVo.setMsg(msg);
        return commonResultVo;
    }
}
